//饼状图的绘画
var pieChart = echarts.init(document.getElementById('pie'));

// 指定饼状图图表的配置项和数据
var pieOption = {
    color: ["#F78181", "#01DFD7"],
    series: [{
        name: '访问量',
        type: 'pie',
        radius: '60%',
        data: [{
                value: 5,
                name: '未还款'
            },
            {
                value: 10,
                name: '已还款'
            }
        ]
    }]
};

//使用刚指定的配置项和数据显示饼状图图表。
pieChart.setOption(pieOption);


//柱状图配置
var histogramChart = echarts.init(document.getElementById('histogram'));

var histogramOption = {
    color: ["#F78181"],
    title: {},
    tooltip: {},
    legend: {},
    xAxis: {
        data: [" ", "已还款", "未还款", " "]
    },
    yAxis: {},
    series: [{
        type: 'bar',
        data: [0, 5, 20, 0],
        barWidth: 60
    }]
};

//实例图 南丁格尔图
option = {
    backgroundColor: '#E0F8F1',
    series: [{
        name: "测试",
        type: "pie",
        radius: '55%',
        roseType: 'angle',
        label: {
            textStyle: {
                color: '#5882FA'
            }
        },
        labelLine: {
            lineStyle: {
                color: '#58D3F7'
            }
        },
        itemStyle: {
            shadowBlur: 100,
            shadowColor: '#BDBDBD',
            emphasis: {
                shadowBlur: 300,
                shadowColor: '#0B4C5F',
            }
        },
        data: [{
                name: "python",
                value: 500,
            },
            {
                name: "java",
                value: 300
            },
            {
                name: "javascript",
                value: 1000
            },
            {
                name: "c",
                value: 600
            },
        ]
    }]
};

//使用刚指定的配置项和数据显示饼状图图表。
histogramChart.setOption(histogramOption);